package com.blu.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import com.blu.entity.User;

@Controller
public class indexController {
	
	@GetMapping("/")
	public String index(Model model, HttpSession httpSession) {
		String username = (String) httpSession.getAttribute("user-name");
		User user = new User();
		user.setUsername(username);
		model.addAttribute("user",user);
		return "index";
	}

}
